package app.inmos.dialogs;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;

public class InformeDialogoMail extends DialogFragment {
	
	
	public static InformeDialogoMail getInstance(String pTituloVentana, String pMensajeVentana) {
		InformeDialogoMail frag = new InformeDialogoMail();
        Bundle args = new Bundle();
        args.putString("tituloVentana", pTituloVentana);
        args.putString("mensajeVentana", pMensajeVentana);
        
        frag.setArguments(args);
        return frag;
    }
	
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
 
    	String  tituloVentana = getArguments().getString("tituloVentana");
    	String contenidoVentana= getArguments().getString("mensajeVentana");
    	
        AlertDialog.Builder builder =
                new AlertDialog.Builder(getActivity());
 
        builder.setMessage(contenidoVentana)
               .setTitle(tituloVentana)
               .setNeutralButton("OK", new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {
                     //  dialog.cancel();
                   }
               });
 
        return builder.create();
    }

}
